<template>
    <div>
        <h1>{{$route.params.name}}</h1>
        <h1>{{$route.params.age}}</h1>
    </div>
</template>
<script>
export default{
    name:'Hi',
    data(){
        return {
            msg:'Hi,传参页面!'
        }
    },
    beforeRouteEnter:(to,from,next)=>{
        console.log("准备进入路由模板");
        next();
    },
    beforeRouteLeave: (to, from, next) => {
        console.log("准备离开路由模板");
        next();
    }
}
</script>
<style>
</style>